import http from '../utils/http'

/**
 * 进行登录操作
 * @param {*} code 临时登录凭证
 */
export const reqLogin = (code) => {
  return http.get(`/weixin/wxLogin/${code}`)
}

// 获取用户信息
export const reqUserInfo = () => {
  return http.get('/weixin/getuserInfo')
}

//实现本地资源上传
export const reqUploadFile = (filePath, name) => {
  return http.upload('/fileUpload', filePath, name)
}

// 更新用户信息
export const reqUpdateUserInfo = (userInfo) => {
  return http.post('/weixin/updateUser', userInfo)
}
